<!DOCTYPE html>
<html lang="en"

      xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/css/bootstrap.min.css">

  <title>添加图书</title>
  <style>
    nav {
      font-size: 1.5rem;
      background-color: #21D4FD;
      background-image: -webkit-linear-gradient(19deg, #21D4FD 0%, #B721FF 100%);
      background-image: -moz-linear-gradient(19deg, #21D4FD 0%, #B721FF 100%);
      background-image: -o-linear-gradient(19deg, #21D4FD 0%, #B721FF 100%);
      background-image: linear-gradient(19deg, #21D4FD 0%, #B721FF 100%);
    }
    h1 {
      font-size: 2rem;
    }
    li {
      margin: 10px 20px;
    }
    body {
      /*             background-image: url("../static/img/2.jpg"); */
      background-size: cover;
    }






  </style>
</head>
<body>

<!--图书编辑页面-->
<nav class="navbar navbar-expand-sm bg-primary navbar-dark">
  <ul class="navbar-nav">
    <li>
      <h1><a th:href="@{/web/toindex(admin='admin')}" style="color: white; text-decoration: none">恋文图书管理系统</a></h1>
    </li>
    <li class="nav-item">
      <a class="nav-link" th:if="${session.user.admin} eq '1'" th:href="@{/book/showbook}">图书管理</a>
      <a class="nav-link" th:if="${session.user.admin} eq '0'" th:href="@{/book/showbook1}">图书信息</a>
    </li>
    <li class="nav-item">
      <a class="nav-link" th:if="${session.user.admin} eq '1'" th:href="@{/user/showuser}">读者管理</a>
    </li>
    <li class="nav-item">
      <a class="nav-link" th:if="${session.user.admin} eq '1'" >借还管理</a>
      <a class="nav-link" th:if="${session.user.admin} eq '0'" >借还记录</a>
    </li>
  </ul>


  <div class="text-white" style="font-size: medium; position: absolute; bottom: 30px; right: 40px">
    <div class="dropdown">
      <a class="dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"
         th:text="${session.user.username}+', 您好'">
      </a>
      <div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
        <a class="dropdown-item" th:href="@{/user/logout}">注销</a>
      </div>
    </div>
  </div>
</nav>


<div class="container">
  <form th:action="@{/book/addbook}" method="post">

    <table class="table">

      <tr>
        <th>书名</th>
        <td><input type="text" class="form-control" id="bookname" name="bookname" ></td>
      </tr>
      <tr>
        <th>作者</th>
        <td><input type="text" class="form-control" id="author" name="author" ></td>
      </tr>
      <tr>
        <th>出版社</th>
        <td><input type="text" class="form-control" id="publisher" name="publisher"></td>
      </tr>

      <tr>
        <th>简介</th>
        <td><input type="text" class="form-control" id="summary" name="summary"></td>
      </tr>
      <tr>
        <th>价格</th>
        <td><input type="text" class="form-control" id="price" name="price" ></td>
      </tr>
      <tr>
        <th>ISBN</th>
        <td><input type="text" class="form-control" id="isbn" name="isbn" ></td>
      </tr>

      <tr>
        <th>语言</th>
        <td><input type="text" class="form-control" id="language" name="language" ></td>
      </tr>

      <tr>
        <th>出版日期</th>
        <td><input type="text" class="form-control" id="pubdate" name="pubdate" ></td>
      </tr>
      <tr>
        <th>书架号</th>
        <td><input type="text" class="form-control" id="pressmark" name="pressmark"></td>
      </tr>
      <tr>
        <th>分类号</th>
        <td><input type="text" class="form-control" id="typeId" name="typeId" ></td>
      </tr>

      <tr>
        <th>库存</th>
        <td><input type="text" class="form-control" id="stock" name="stock" ></td>
      </tr>
    </table>
    <a th:href="@{/book/showbook}" class="btn btn-outline-primary btn-lg">返&nbsp;&nbsp;&nbsp;&nbsp;回</a>

    <span><button  type="submit" class="btn btn-outline-primary btn-lg">提交</button></span>

  </form>
</div>

</body>
<script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
<script src="https://cdn.staticfile.org/popper.js/1.15.0/umd/popper.min.js"></script>
<script src="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/js/bootstrap.min.js"></script>
</html>